Visual Basic (Declaration) | |
---|---|
Public Shadows Function Clone() As BPlusTree(Of TKey,TValue) |
C# | |
---|---|
public new BPlusTree<TKey,TValue> Clone() |
BPlusTree/BPlusTree.Test/TestBPlusTreeOptions.cs
C# | Copy Code |
---|---|
var options = new BPlusTree<int, int>.Options(PrimitiveSerializer.Int32, PrimitiveSerializer.Int32) { CreateFile = CreatePolicy.IfNeeded, BTreeOrder = 4 }; var copy = options.Clone(); Assert.IsFalse(Object.ReferenceEquals(options, copy)); Assert.IsTrue(Object.ReferenceEquals(options.CallLevelLock, copy.CallLevelLock)); //If we get/set the lock prior to clone we will have the same lock instance. options.CallLevelLock = new SimpleReadWriteLocking(); copy = options.Clone(); Assert.IsFalse(Object.ReferenceEquals(options, copy)); Assert.IsTrue(Object.ReferenceEquals(options.CallLevelLock, copy.CallLevelLock)); |
VB.NET | Copy Code |
---|---|
Dim options As var = New BPlusTree(Of Integer, Integer).Options(PrimitiveSerializer.Int32, PrimitiveSerializer.Int32) With { _ Key .CreateFile = CreatePolicy.IfNeeded, _ Key .BTreeOrder = 4 _ } Dim copy As var = options.Clone() Assert.IsFalse([Object].ReferenceEquals(options, copy)) Assert.IsTrue([Object].ReferenceEquals(options.CallLevelLock, copy.CallLevelLock)) 'If we get/set the lock prior to clone we will have the same lock instance. options.CallLevelLock = New SimpleReadWriteLocking() copy = options.Clone() Assert.IsFalse([Object].ReferenceEquals(options, copy)) Assert.IsTrue([Object].ReferenceEquals(options.CallLevelLock, copy.CallLevelLock)) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
BPlusTree.Options<TKey,TValue> ClassBPlusTree.Options<TKey,TValue> Members
Used By
Int32 BPlusTreeSource Code
BPlusTree/Collections/BPlusTree.Options.csBPlusTree/Collections/BPlusTree.cs